using System.IO;
using QFramework.Framework.ResKit.HotUpdate;
using UnityEditor;
using UnityEngine;

namespace QFramework.Playground
{
    public class Playground : MonoBehaviour
    {
#if UNITY_EDITOR
        [MenuItem("QFramework/Playground")]
        private static void MenuClicked()
        {
            var remoteResVersionPath =
                Application.dataPath + "/QFramework/Framework/ResKit/HotUpdate/RemoteResVersion.json";

            var jsonContent = JsonUtility.ToJson(new ResVersion());

            File.WriteAllText(remoteResVersionPath, jsonContent);

            AssetDatabase.Refresh();
        }
#endif
    }
}